import { defineStore } from "pinia";

const useUserstore= defineStore("user",{
    state:()=>({
        token:"",
        userInfo:null
    }),
    getters:{
        islogined:(state)=>{
            return !!state.token
        }
    },
    actions:{
        setToken(token:string){
            this.token = token
        }
    }
})
export default useUserstore